package com.lzh.shijicloudstack.model.entity;

import com.lzh.shijicloudstack.common.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.TableName;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 菜单权限表(SysMenu)表实体类
 *
 * @author makejava
 * @since 2023-12-28 16:14:28
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_menu")
@Entity
@Table(name = "sys_menu", indexes = {})
public class Menu extends BaseEntity {

    /**
     * 菜单名称
     */
    @Column(name = "menu_name", columnDefinition = "varchar(255) COMMENT '菜单名称'")
    private String menuName;

    /**
     * 父菜单ID
     */
    @Column(name = "parent_id", columnDefinition = "bigint(20) COMMENT '父菜单ID'", nullable = false)
    private Long parentId;

    /**
     * 显示顺序
     */
    @Column(name = "order_num", columnDefinition = "int COMMENT '显示顺序'", nullable = false)
    private Integer orderNum;

    /**
     * 路由地址
     */
    @Column(name = "path", columnDefinition = "varchar(255) COMMENT '路由地址'")
    private String path;

    /**
     * 组件路径
     */
    @Column(name = "component", columnDefinition = "varchar(255) COMMENT '组件路径'")
    private String component;

    /**
     * 是否为外链（0是 1否）
     */
    @Column(name = "is_frame", columnDefinition = "int COMMENT '是否为外链（0是 1否）'", nullable = false)
    private Integer isFrame;

    /**
     * 菜单类型（M目录 C菜单 F按钮）
     */
    @Column(name = "menu_type", columnDefinition = "int COMMENT '菜单类型（M目录 C菜单 F按钮）'", nullable = false)
    private Integer menuType;

    /**
     * 菜单状态（0显示 1隐藏）
     */
    @Column(name = "visible", columnDefinition = "int COMMENT '菜单状态（0显示 1隐藏）'", nullable = false)
    private Integer visible;

    /**
     * 菜单状态（0正常 1停用）
     */
    @Column(name = "status", columnDefinition = "int COMMENT '菜单状态（0正常 1停用）'", nullable = false)
    private Integer status;

    /**
     * 权限标识
     */
    @Column(name = "perms", columnDefinition = "varchar(255) COMMENT '权限标识'")
    private String perms;

    /**
     * 菜单图标
     */
    @Column(name = "icon", columnDefinition = "varchar(255) COMMENT '菜单图标'")
    private String icon;

    /**
     * 备注
     */
    @Column(name = "remark", columnDefinition = "varchar(255) COMMENT '备注'")
    private String remark;

}
